<%@ page language="java" import="java.util.*,java.net.URLDecoder" pageEncoding="UTF-8"%>
<html>
<head>
    <title>wxappid测试</title>
    <script src="js/jquery-1.8.3.min.js" type="text/javascript"></script>
</head>
<body>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<a href="" onclick="getUserAppId()">获取微信appid</a>
<script>
    function getUserAppId() {
        //获取appID的url
        var getappIdUrl="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxf2d2a3b6371ba334&redirect_uri=http://baigt.iok.la/rqb&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect";
        $.ajax({
            type:"get",
            url:getappIdUrl,
            success:function(response){
                alert(response)
            }
        });
    }
</script>
</body>
</html>
